#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#define int long long
using namespace std;

void solve()
{
	int n; cin >> n;
	vector<int> arr(n); for (auto& e : arr) cin >> e;
	vector<int> ans(n); ans[0] = 1;
	for (int i = 1; i < n; ++i)
	{
		int diff = arr[i] - arr[i - 1];
		if (i - diff < 0) ans[i] = 1 + i;
		else ans[i] = ans[i - diff];
	}
	for (auto& e : ans) cout << e << ' '; cout << endl;
}

signed main()
{
	int t; cin >> t;
	while (t--) solve();
	return 0;
}

//4 3 1 3 6 3 1 3 5 3 1 3 4 4 1 2 3 7

//1 2 3
//1 2 1
//1 2 2
//1 1 1 2